package regexp.exercise;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-06-16
 * Time:17:41
 */
public class Exercise1 {
    public static void main(String[] args) {
        String content = "abd@suhu.com.cn";
        content = "12345abcd@bupt.edu.cn";
        content = "12345abcd@bupt.edu.cn.";
        String regex = "^[\\w-]+@([a-zA-Z]+\\.)+[a-zA-Z]+$";
        if (content.matches(regex)) {
            System.out.println("Succeed");
        } else {
            System.out.println("Failed");
        }
    }
}
